package com.example.fw;

import org.openqa.selenium.By;
import com.example.tests.ContactObjects;

public class ContactWorker extends BaseWorker{

	public ContactWorker(ApplicationManager manager) {
		super(manager);
	}
	
	public void fillupContactForm(ContactObjects contactInfo) {
		input(By.name("firstname"), contactInfo.firstName);
		input(By.name("lastname"), contactInfo.lastName);
		input(By.name("address"), contactInfo.address1);
		input(By.name("home"), contactInfo.homePhone1);
		input(By.name("mobile"), contactInfo.mobilePhone);
		input(By.name("work"), contactInfo.workPhone);
		input(By.name("email"), contactInfo.email1);
		input(By.name("email2"), contactInfo.email2);
		selectByText(By.name("bday"), contactInfo.birthDay);
		selectByText(By.name("bmonth"), contactInfo.birthMonth);
		input(By.name("byear"), contactInfo.birthYear);
		selectByText(By.name("new_group"), contactInfo.assignedGroup);
		input(By.name("address2"), contactInfo.address2);
		input(By.name("phone2"), contactInfo.homePhone2);	
	}
}
